<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 2017/2/22
 * Time: 15:53
 */
namespace app\manage\controller;
use think\Controller;
use think\Db;
use think\Request;
use think\View;
use app\common\model\Menu;
use app\common\model\Permission;
class Common extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->getMenu();
    }


    /**
     * 菜单展示
     * @return mix
     */
    public function getMenu()
    {
        $menuModel = new Menu();
    	$data = $menuModel->node();

        // $perModel = new Permission();
        // $data = $perModel->gropuPre(1);
        // $data = tree($data);

    	$this->view->assign('controller', Request::instance()->controller());
    	$this->view->assign('action', Request::instance()->action());
    	$this->view->assign('menu',$data);
    }

}